package com.gopay.common.constants.riskcontrol;

import java.util.Map;
import java.util.TreeMap;

/**
 * @RclTranDirection
 * @AUTHOR LIUYONG
 * @2017/5/18 14:46 www.gopay.com.cn Inc.All rights reserved.
 */
public enum RclTranDirection {
    FROM_ALL("01"),

    FROM_B_ACCOUNT("02"),

    FROM_B_BANK("03"),

    FROM_C_ACCOUNT("04"),

    FROM_C_BANK("05"),

    TO_ALL("06"),

    TO_B_ACCOUNT("07"),

    TO_B_BANK("08"),

    TO_C_ACCOUNT("09"),

    TO_C_BANK("10"),

    TO_MYSELF_C_BANK("11"),

    TO_OTHER_C_BANK("12");


    public final String value;

    RclTranDirection(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return this.value;
    }

    public static Map<String ,String> TranslateRclTranDirection(){
        Map<String,String> directionMap = new TreeMap<String,String>();
        directionMap.put("01","FROM_ALL");
        directionMap.put("02","FROM_B_ACCOUNT");
        directionMap.put("03","FROM_B_BANK");
        directionMap.put("04","FROM_C_ACCOUNT");
        directionMap.put("05","FROM_C_BANK");
        directionMap.put("06","TO_ALL");
        directionMap.put("07","TO_B_ACCOUNT");
        directionMap.put("08","TO_B_BANK");
        directionMap.put("09","TO_C_ACCOUNT");
        directionMap.put("10","TO_C_BANK");
        directionMap.put("11","TO_MYSELF_C_BANK");
        directionMap.put("12","TO_OTHER_C_BANK");

        return directionMap;
    }
    public static Map<String ,String> TranDirectionCode(){
        Map<String,String> codeMap = new TreeMap<String,String>();
        codeMap.put("FROM_ALL","01");
        codeMap.put("FROM_B_ACCOUNT","02");
        codeMap.put("FROM_B_BANK","03");
        codeMap.put("FROM_C_ACCOUNT","04");
        codeMap.put("FROM_C_BANK","05");
        codeMap.put("TO_ALL","06");
        codeMap.put("TO_B_ACCOUNT","07");
        codeMap.put("TO_B_BANK","08");
        codeMap.put("TO_C_ACCOUNT","09");
        codeMap.put("TO_C_BANK","10");
        codeMap.put("TO_MYSELF_C_BANK","11");
        codeMap.put("TO_OTHER_C_BANK","12");

        return codeMap;
    }

}
